package yuan.deng.service;

import yuan.deng.dao.StudentDao;
import yuan.deng.dao.StudentDaoImpl;
import yuan.deng.domain.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    //创建dao对象
    StudentDao dao =new StudentDaoImpl();
    //查询所有学生的信息
    @Override
    public List<Student> findAll() {
        return dao.findAll();
    }
    //增加表中数据
    @Override
    public int add(Student student) {
        return dao.add(student);
    }
    //模糊查询，按姓名
    @Override
    public List<Student> findLike(String s) {
        return dao.findLike(s);
    }
    //按id删除数据
    @Override
    public int del(int id) {
        return dao.del(id);
    }
}
